﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TH_QuangCaoAdmin.ascx.cs" Inherits="admin_MyUserControls_TH_QuangCaoAdmin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Label ID="lblStatus" runat="server" CssClass="AdminPageText" 
    Text=""></asp:Label>
<p>
    <asp:Label ID="lblLocation" runat="server" CssClass="AdminPageText" 
        Text="Các quảng cáo hiện có"></asp:Label>
</p>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="id" Width="100%" onrowdeleting="grid_RowDeleting"
            onrowdatabound="grid_RowDataBound"
            AllowPaging="False" >
            <Columns>
                <asp:ImageField DataImageUrlField="HinhMinhHoa" 
                    DataImageUrlFormatString="../../images/quangcao/{0}" HeaderText="Hình ảnh">
                    <ControlStyle Height="60px" Width="60px" />
                </asp:ImageField>
                <asp:TemplateField HeaderText="Vị trí" 
                    SortExpression="ViTri">
                    <ItemTemplate>
                        <asp:Label ID="lblViTri" runat="server" Text='<%# Bind("ViTri") %>'></asp:Label>
                    </ItemTemplate>
                    <ControlStyle Width="40px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Giá" 
                    SortExpression="Gia">
                    <ItemTemplate>
                        <asp:Label ID="lblGia" runat="server" Text='<%# Bind("Gia") %>'></asp:Label>
                    </ItemTemplate>
                    <ControlStyle Width="50px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Khách hàng" 
                    SortExpression="TenKhachHang">
                    <ItemTemplate>
                        <asp:Label ID="lblTenKhachHang" runat="server" Text='<%# Bind("TenKhachHang") %>'></asp:Label>
                    </ItemTemplate>
                    <ControlStyle Width="120px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ngày bắt đầu" 
                    SortExpression="NgayBatDau">
                    <ItemTemplate>
                        <asp:Label ID="txtNgayBatDau" runat="server" Text='<%# Bind("NgayBatDau") %>'></asp:Label>
                    </ItemTemplate>
                    <ControlStyle Width="150px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Ngày kết thúc" 
                    SortExpression="NgayKetThuc">
                    <ItemTemplate>
                        <asp:Label ID="txtNgayKetThuc" runat="server" Text='<%# Bind("NgayKetThuc") %>'></asp:Label>
                    </ItemTemplate>
                    <ControlStyle Width="150px" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink Runat="server" Text="Select" 
                          NavigateUrl='<%# "../ChiTietQuangCao.aspx?id=" + 
                            Eval("id") %>'
                          ID="HyperLink1">
                        </asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField  HeaderText="">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtnDelete" CommandArgument='<%# Eval("id") %>' CommandName="Delete" runat="server">Delete</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </ContentTemplate>
</asp:UpdatePanel>

<br />
<br />
